package com.lh.bootscheduled.task;

import com.lh.bootcommon.utils.DateUtil;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author lh
 * @Description:
 * @date 2021/4/1 10:58
 */
@Component
public class TestTimerTask {
	@Scheduled(cron = "0/5 * * * * ?")
	public void test(){
		System.out.println("执行定时任务的时间是："+ DateUtil.format(new Date()));
	}
}
